frappe.ui.form.on('Sales Order', {
	items_batch_copy(frm, child_rows) {
	    frappe.call({
			method: "matrix_fo.api.batch_copy_items",
			args: {
			    doc: frm.doc,
			    child_rows: child_rows
			},
			freeze: true,
			freeze_message: __("后台处理中 ..."),
		})
		.then(r =>{
		    frappe.model.sync(r.message);
		    frm.refresh();
		})
	}
})